package string;

/**
 * boolean startsWith(String s):
 * 判断当前字符串是否是以给定的字符串(s)开始的
 * boolean endsWith(String s)
 * 判断当前字符串是否是以给定的字符串(s)结束的
 */
public class StartWithDemo {
    public static void main(String[] args) {
        String str = "thinking in java";//java编程思想
        boolean start = str.startsWith("think");//T
        System.out.println(start);
        boolean ends = str.endsWith(".png");//F
        System.out.println(ends);
    }
}
